home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Utilities / Compression / Unix Compression / Ship / ship.doc next >
Encoding:
Text File  |  1993-09-03  |  5.7 KB  |  153 lines  |  [TEXT/ttxt]

  1. MacShip
  2. -------
  3.  
  4. Well I got sick of having to do all this stuff on a Unix box so I ported ship 
  5. to my mac (Not as easy as one might think)
  6.  
  7. If you keep it the executable named unship you dont have to add the -u flag 
  8. to the command line.
  9.  
  10. If you want to create ship archives then you should make a copy of unship 
  11. and name it ship.  You will have to add any necessary flags to the command
  12. line.
  13.  
  14. Im not sure if I am required to state this but portions of the
  15. program are built using source from the GNU project. (glibc-1.06)
  16.  
  17.  
  18. Mac port of Ship by:
  19.  
  20.         John Cavanaugh
  21.         cavanaug@ecn.purdue.edu
  22.  
  23.  
  24. ---------------------------------------------------------------------------
  25.  
  26.  
  27. SHIP -
  28.  
  29.   Ship is a program for sending binary files through email.  It is designed
  30.   to supplant uuencode and uudecode.  Ship encodes approximately 6.23 bits
  31.   per character mailed, compared to uuencode's 5.73 bits per character.
  32.  
  33.   Ship also has these features: a 32-bit CRC check on each file; automatic
  34.   splitting of the ship output into multiple, smaller files for speedier
  35.   mailing; automatic mailing of ship's output, with subject lines for
  36.   multiple parts; and a check on the sequence of parts when unshipping.
  37.  
  38.   Usage:
  39.  
  40.        ship [-nnn] [-m address] [-s subject] file ...
  41.  
  42.   where nnn is the maximum number of K bytes for each output file, address
  43.   is the address to send mail to, subject is a Subject" line prefix, and
  44.   file ... is a list of files to ship.  If no options are given, ship
  45.   outputs to stdout.  The simplest use is:
  46.  
  47.        ship foo > x
  48.  
  49.   where foo is converted into the mailable file, x.
  50.  
  51.   When -nnn is specified, but -m is not, ship writes to the files
  52.   part0001, part0002, etc., where each file has nnn or less K bytes.  For
  53.   example:
  54.  
  55.        ship -25 bigfoo
  56.  
  57.   will write however many 25K byte or less ship files is needed to contain
  58.   bigfoo.  If, say, six files are needed, then the files part0001 to part0006
  59.   will be written.
  60.  
  61.   When using -m, nothing is written, either to files or to stdout; rather,
  62.   the output is mailed to the specified address.  If -nnn is also specified,
  63.   then the parts are mailed separately with the subject lines part0001, etc.
  64.   If -nnn is not specified, then only one part (the whole thing) is mailed
  65.   with the subject line "part0001".  For example:
  66.  
  67.        ship -25 -m fred bigfoo
  68.  
  69.   will mail the six parts of bigfoo to fred.
  70.  
  71.   Any number of files can be shipped at once.  They become part of one long
  72.   ship stream, so if, for example -25 is specified, all but the last part
  73.   will have about 25K bytes.  For example:
  74.  
  75.        ship -25 -m fred fee fi fo fum
  76.  
  77.   will send the files fee, fi, fo, and fum to fred.
  78.  
  79.   Fred will get several mail messages with the subject lines part0001, etc.
  80.   He can then save those messages as the files, say, p1, p2, p3, ...
  81.   Then he can use the command:
  82.  
  83.        ship -u p?
  84.  
  85.   to recreate bigfoo, or fee fi fo and fum, depending on what he was sent.
  86.   If Fred saved the wrong numbers, ship will detect this and report a
  87.   sequence error.
  88.  
  89.   Note: there is enough information in the shipped parts to determine the
  90.   correct sequence.  A future version of ship will prescan the files to
  91.   determine the sequence, and then process them in the correct order.
  92.  
  93.   If a file being received already exists, ship -u will report an error
  94.   and exit.  The -o option avoids this and allows ship to overwrite existing
  95.   files.  The -o option must follow the -u option:
  96.  
  97.        ship -u -o p?
  98.  
  99.   In addition to the -u option, ship will unship if it sees that its name is
  100.   unship.  On Unix systems, this can be done simply by linking the executable
  101.   to unship:
  102.  
  103.        ln ship unship 
  104.  
  105.   Ship can also be used as a filter.  The special file name "-" means stdin.
  106.   For example:
  107.  
  108.        tar covf - foodir | compress | ship -25 -m fred -
  109.  
  110.   will tar the directory foodir, compress it, and ship it to fred in 25K byte
  111.   pieces.  Then, after Fred saves the files as p01, etc. at the other, end,
  112.   he can:
  113.  
  114.        ship -u p? | zcat | tar xovf -
  115.  
  116.   which will recreate the directory foobar and its contents.  ship -u knows
  117.   to write to stdout, since the original ship put the special file name "-"
  118.   in the first part.
  119.  
  120.   Ship uses a base 85 coding that needs 32-bit multiplication and division.
  121.   This can be slow on 16-bit machines, so ship provides a fast encoding
  122.   method by specifying the -f option.  This method is somewhat faster even
  123.   on 32-bit machines, and has approximately a 1% penalty in the size of the
  124.   encoded result (-f gives 6.26 bits per character, on the average).  The -f
  125.   option need only be used when shipping--unshipping (ship -u) automatically
  126.   detects the encoding used.  For example:
  127.  
  128.        ship -f -25 -m fred foo
  129.  
  130.   will send foo to fred in 25K byte pieces using the fast encoding method.
  131.   You don't need to tell Fred, since ship -u will figure that out for him.
  132.  
  133.   The fast encoding method is probabilistic, so it's possible for the size
  134.   penalty to be worse than 1%, and it's also possible for the fast encoding
  135.   to produce a smaller result than base 85 encoding would, all depending on
  136.   the data.
  137.  
  138.   The -q option can be used with either ship or unship (ship -u) for quiet
  139.   operation--informational messages are inhibited.
  140.  
  141.   You can find out the version of ship and get the command usage by using
  142.   "ship -h" or "ship -?".  The version number and date and help will be
  143.   printed, and ship will exit (the rest of the command line is ignored).
  144.  
  145.   Acknowledgements:
  146.  
  147.   The hard-arithmetic coding algorithm was blatantly stolen from Peter
  148.   Gutmann's pgencode/pgdecode programs posted on comp.compression, with
  149.   modifications to use 86 instead of 94 characters, and to make zeros encode
  150.   better than, rather than worse than other bytes.  (As Stravinsky once said:
  151.   "Mediocre composers plagiarize.  Great composers steal.")
  152.  
  153.